# transform a dataframe of covariables to a list of 'im' covariable object
# 
# @data: a dataframe object contains all of covariables. each row present a sample site,
#           each column represent a covariable
# @size: a vector contains number of row and column in data
# @xcol, yrow: vectors of corrdinations of covariable in x asix and y asix
#
# Author: guochun
###############################################################################


covrMaker=function(data,size,xcol,yrow)
{
	covr=list()
	for (i in 1:dim(data)[2])
		covr[[paste('pca',i,sep="")]]=im(matrix(data[,i],size[1],size[2]),xcol=xcol,yrow=yrow)
	return (covr)
}

